using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using MvcMall.Core.Domains;
using MvcMall.Core.Enums;

namespace MvcMall.Data.NHibernateMaps
{
    public class UserAccountTranMap:IAutoMappingOverride<UserAccountTran>
    {
        public void Override(AutoMapping<UserAccountTran> mapping)
        {
            mapping.References(c => c.SendUser).Column("SendUser");
            mapping.References(c => c.ReceiveUser).Column("ReceiveUser");
            mapping.Map(c => c.MoneyTransType).CustomType(typeof (MoneyTransType));
        }
    }
}